package day2;

import java.util.Scanner;

public class demo1 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        double x=scanner.nextDouble();
        String n=scanner.next();
        int ret=20;
        if("y".equals(n)){
            ret+=5;
        }
        x-=1;
        ret+=Math.ceil(x);
        System.out.println(ret);

    }
}
